<%@ page language="java" isELIgnored="false"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.cmwa.solution.utils.SessionUtils" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/wasp-tags" prefix="wasp" %>
<c:set var="currentEmpType" value="<%=SessionUtils.getEmployee().getEmpType()%>"></c:set>
<header>

	<div class="header clear" style="position: relative; width: 1100px; overflow: visible;">
		<div class="back-index">
			<i class="fas fa-chevron-left"></i> <a
				href="/solution/index/solutionIndexView.do">返回首页</a>
		</div>
		<div class="menu">
			<!-- TODO 权限控制 -->
			<ul class="clear">
				<li
					class="item cpcs-noauth <wasp:hasPermission id="projectBuild">cpcs</wasp:hasPermission> <c:if test="${param.currentActive == 'cpcs' }">active</c:if>"><a
					<wasp:hasPermission id="projectBuild">href="/solution/business/prdSetup/home.do"</wasp:hasPermission>></a></li>
				<li
					class="item khqydj-noauth <wasp:hasPermission id="customerBehalfRegister">khqydj</wasp:hasPermission> <c:if test="${param.currentActive == 'qydj' }">active</c:if>"><a
					<wasp:hasPermission id="customerBehalfRegister">href="/solution/business/custRegister/home.do"</wasp:hasPermission>></a></li>
				<li
					class="item cpyy-noauth <wasp:hasPermission id="projectOperation">cpyy</wasp:hasPermission> <c:if test="${param.currentActive == 'cpyy' }">active</c:if>"><a
					<wasp:hasPermission id="projectOperation">href="/solution/business/prdOperation/home.do"</wasp:hasPermission>></a></li>
				<li
					class="item khqyqs-noauth <wasp:hasPermission id="customerBehalfCheck">khqyqs</wasp:hasPermission> <c:if test="${param.currentActive == 'qyqs' }">active</c:if>"><a
					<wasp:hasPermission id="customerBehalfCheck">href="/solution/business/customerEquity/home.do"</wasp:hasPermission>></a></li>
				<li
					class="item xxpl-noauth <wasp:hasPermission id="infoDisclose">xxpl</wasp:hasPermission> <c:if test="${param.currentActive == 'xxpl' }">active</c:if>"><a
					<wasp:hasPermission id="infoDisclose">href="/solution/business/infoDisclosure/home.do"</wasp:hasPermission>></a></li>
				<li
					class="item tzyj-noauth <wasp:hasPermission id="investResearch">tzyj</wasp:hasPermission> <c:if test="${param.currentActive == 'tzyj' }">active</c:if>"><a
					<wasp:hasPermission id="investResearch">href="/solution/business/investmentResearch/home.do"</wasp:hasPermission>></a></li>
				<li
					class="item tzjy-noauth <wasp:hasPermission id="investDealManage">tzjy</wasp:hasPermission> <c:if test="${param.currentActive == 'tzjy' }">active</c:if>"><a
					<wasp:hasPermission id="investDealManage">href="/solution/business/investTrade/home.do"</wasp:hasPermission>></a></li>
				<li
					class="item fxjx-noauth <wasp:hasPermission id="riskPerformance">fxjx</wasp:hasPermission> <c:if test="${param.currentActive == 'fxjx' }">active</c:if>"><a
					<wasp:hasPermission id="riskPerformance">href="/solution/business/riskScalpel/home.do"</wasp:hasPermission>></a></li>
			</ul>
		</div>
		<div class="to-my">
			<a id="user-info" class="my" href="/solution/business/myHome/home.do">
				<div class="user-hint username"><%=SessionUtils.getEmployee().getName()%></div>
				<div class="user-hint firm" title="<%=SessionUtils.getEmployee().getCompanyName()%>"><%=SessionUtils.getEmployee().getCompanyName()%><i style="margin-left: 7px;" class="fa fa-caret-down" aria-hidden="true"></i></div>
			</a>
			<div class="msg-ring" onclick="window.location.href='/solution/business/myHome/home.do'"><img src="/solution/resources/modules/bootstrap/image/msg-ring.png" alt="新消息"></div>
			<span class="my-circle" onclick="window.location.href='/solution/business/myHome/home.do'"></span>
			<ul class="user-oper-div">
				<div class="bdnuarrow"><em></em><i></i></div>
				<c:if test="${currentEmpType eq 'OUT'}">
					<li class="dropdown">
						<dl>
							<dd>
								<a href="javascript:modifyPwdDialog()">修改密码</a>
							</dd>
						</dl>
					</li>
				</c:if>
				<wasp:hasPermission id="jumpToBackEndSystem">
					<li class="dropdown">
						<dl >
							<dd style="text-align: center;"><a href="javascript:$.get('/solution/utils/cached/shareCached/refreshShareCached.do',function() {window.location.reload()});" style="color: #666; text-align: center;">刷新缓存</a></dd>
						</dl>
					</li>
				</wasp:hasPermission>
				<li class="dropdown">
					<dl>
						<dd>
							<a href="javascript:logout();">退出登陆</a>
						</dd>
					</dl>
				</li>
			</ul>
		</div>
	</div>
	
	<script type="text/javascript">
		$(function() {
			$("#user-info").mouseover(function (){  
		        $(".user-oper-div").show();  
		    }).mouseout(function (){  
		        $(".user-oper-div").hide();  
		    });
		    $(".user-oper-div").mouseover(function (){  
		    	$(".user-oper-div").show();  
		    }).mouseout(function (){  
		    	$(".user-oper-div").hide();  
		    });
			
			getTodoCount();
			// 定时刷新数据
			setInterval(function() {
				getTodoCount();
			}, 30000);
		})
		function getTodoCount() {
			var actionUrl = "/solution/business/myHome/todoAndOutput/queryTodoCount.do";
			$.ajax({
				type : 'POST',
				url : actionUrl,
				dataType : 'json',
				success : function(data) {
					if (data.object && data.object > 0) {
						$(".my-circle").show();
						
						var count = data.object * 1;
						if(count > 99) {
							$(".my-circle").html("99+");
						} else {
							$(".my-circle").html(count);
						}
						
					} else {
						$(".my-circle").hide();
					}
				}
			});
		}
	</script>
</header>
